package com.hk.yajin.function.members.activity;

import android.content.Context;
import android.text.TextUtils;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hk.developmentlib.utills.UiUtil;
import com.hk.yajin.R;
import com.hk.yajin.model.Goods;
import com.hk.yajin.model.Video;

import java.util.List;

/**
 * https://github.com/CymChad/BaseRecyclerViewAdapterHelper
 */
public class GoodsQuickAdapter extends BaseQuickAdapter<Goods, BaseViewHolder> {

    private Context context;
    public int selectPosition = 0;

    public GoodsQuickAdapter(List<Goods> datas, Context ct) {
        super(R.layout.list_item_good, datas);
        context = ct;
    }

    @Override
    protected void convert(BaseViewHolder helper, Goods item) {
        helper.setText(R.id.tv_good, item.getChange_gold() + "金币");
        if (helper.getAdapterPosition() == selectPosition) {
            helper.setChecked(R.id.tv_good, true);
        } else {
            helper.setChecked(R.id.tv_good, false);
        }
    }


}
